package com.project.srtp.dto.req;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserRegisterReqDTO {
    // 登录信息
    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, message = "密码长度至少6位")
    private String password;

    // 企业信息
    @NotBlank(message = "企业名称不能为空")
    private String company;

    @NotBlank(message = "统一信用代码不能为空")
    private String creditCode;

    @NotNull(message = "企业类型不能为空")
    private Long companyType;

    @NotNull(message = "所属行业不能为空")
    private Long industry;

    // 联系人信息
    @NotBlank(message = "联系人不能为空")
    private String contactPerson;

    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String contactPhone;
}
